
chrome.extension.onMessage.addListener(
  function(request, sender, sendResponse) {
    if (request.target == "background")
    {
      if (request.currentHost && request.currentSite) {
        kb.hosts.add(request.currentHost);
        kb.sites.add(request.currentSite);
      };
    }
  }
);